#include "customcalendarwidget.h"

CustomCalendarWidget::CustomCalendarWidget(QWidget *parent ) : QCalendarWidget(parent)
{

}
void CustomCalendarWidget::paintCell(QPainter *painter, const QRect &rect, const QDate &date) const
{
    QCalendarWidget::paintCell(painter, rect, date);  // 绘制默认的日期数字

    // 添加自定义文字，例如日期对应的星期几
    QString text = QLocale().toString(date, "ddd");  // 例如：Mon, Tue等
   // painter->drawText(rect, Qt::AlignBottom | Qt::AlignHCenter, text);
}
